//*********************************************
//  This is Geant4 Template
//                                  author:Qian
//

#ifndef MybasedAnalysis_h
#define MybasedAnalysis_h 1

#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4Event.hh"
#include <iomanip>
#include <vector>
#include <iostream>

class TH1F;
class MyDetectorConstruction;
class MyEvtAction;
class MyRunAction;

class MyBasedAnalysis
{
public:
    MyBasedAnalysis(){m_ValidGen = false;};
    virtual ~MyBasedAnalysis(){};

    virtual void BeginOfEventAction(const G4Event *){};
    virtual void EndOfEventAction(const G4Event *){};

    virtual void BeginOfRunAction(){};
    virtual void EndOfRunAction(){};

    virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *){return G4ClassificationOfNewTrack();};
    virtual void SteppingAction(const G4Step *){};
    virtual void PreTrackingAction(const G4Track *){};
    virtual void PostTrackingAction(const G4Track *){};

    virtual void SetFileName(G4String ) {};
    virtual void SetOutputLevel(G4int ) {};
    virtual void Activated() 
    {
        std::cout << "MyBasedAnalysis::Activated()" << std::endl;
    };
    virtual void Deactivated() {};
    virtual bool IsActivated() {return false;};

    virtual void SetDetectorConstruction(MyDetectorConstruction *) {};
    virtual void SetRunAction(MyRunAction *) {};
    virtual void SetEvtAction(MyEvtAction *) {};

    inline void SetValidFlag(G4bool valid){m_ValidGen = valid;};
    inline G4bool GetValidFlag(){return m_ValidGen;};

protected:
    G4bool m_ValidGen;

private:

};

#endif